<template>
  <div>
    <p>
      <vxe-radio-group v-model="selectTab">
        <vxe-radio-button label="tab1" content="分组按钮1"></vxe-radio-button>
        <vxe-radio-button label="tab2" content="分组按钮2"></vxe-radio-button>
        <vxe-radio-button label="tab3" content="分组按钮3"></vxe-radio-button>
      </vxe-radio-group>
    </p>

    <div v-show="selectTab === 'tab1'">
      <vxe-table border :sync-resize="selectTab" :data="tableData">
        <vxe-column type="seq" width="60"></vxe-column>
        <vxe-column field="name" title="Name"></vxe-column>
        <vxe-column field="sex" title="Sex"></vxe-column>
        <vxe-column field="address" title="Address" show-overflow></vxe-column>
      </vxe-table>
    </div>

    <div v-show="selectTab === 'tab2'">
      <vxe-table border :sync-resize="selectTab" :data="tableData">
        <vxe-column type="radio" width="60"></vxe-column>
        <vxe-column field="role" title="Rolw"></vxe-column>
        <vxe-column field="age" title="Age"></vxe-column>
        <vxe-column field="num" title="Num"></vxe-column>
        <vxe-column field="date12" title="Date"></vxe-column>
      </vxe-table>
    </div>

    <div v-show="selectTab === 'tab3'">
      <vxe-table border :sync-resize="selectTab" :data="tableData">
        <vxe-column type="checkbox" width="60"></vxe-column>
        <vxe-column field="nickname" title="nickname"></vxe-column>
        <vxe-column field="sex" title="Sex"></vxe-column>
        <vxe-column field="age" title="Age"></vxe-column>
        <vxe-column field="date12" title="Date"></vxe-column>
        <vxe-column field="region" title="Region"></vxe-column>
        <vxe-column field="rate" title="Rate"></vxe-column>
      </vxe-table>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        selectTab: 'tab1',
        tableData: [
          { id: 10001, name: 'Test1', role: 'Develop', sex: '0', age: 28, amount: 888, address: 'test abc' },
          { id: 10002, name: 'Test2', role: 'Test', sex: '1', age: 22, amount: 666, address: 'Guangzhou' },
          { id: 10003, name: 'Test3', role: 'PM', sex: '1', age: 32, amount: 89, address: 'Shanghai' },
          { id: 10004, name: 'Test4', role: 'Designer', sex: '0', age: 23, amount: 1000, address: 'test abc' },
          { id: 10005, name: 'Test5', role: 'Develop', sex: '0', age: 30, amount: 999, address: 'Shanghai' }
        ]
      }
    }
  }
</script>

<style scoped></style>